package com.blog.service;

import com.blog.dao.CategoryDao;
import com.blog.entity.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class CategoryService {
    @Autowired
        private  CategoryDao categoryDao;
    /**
     * 查询所有的类型
     * @return
     */
    public List<Category> list(){
        List<Category> categories = categoryDao.selectAll();
        return categories;
    }

}
